package com.xbongbong.paas.model.impl;

import com.xbongbong.paas.constant.PaasConstant;
import com.xbongbong.paas.model.CloudCodePermissionModel;
import com.xbongbong.pro.domain.dao.CloudCodePermissionDao;
import com.xbongbong.pro.domain.entity.CloudCodePermissionEntity;
import com.xbongbong.saas.constant.BasicConstant;
import org.springframework.stereotype.Service;

import javax.annotation.Resource;
import java.util.HashMap;
import java.util.HashSet;
import java.util.List;
import java.util.Map;
import java.util.Set;

/**
 * paasAppModel业务实现
 * @author kaka
 * @time 2018-7-30 18:07
 */
@Service("cloudCodePermissionModel")
public class CloudCodePermissionModelImpl implements CloudCodePermissionModel {

    @Resource
    private CloudCodePermissionDao cloudCodePermissionDao;

    @Override
    public Long insert(CloudCodePermissionEntity entity) {
        return cloudCodePermissionDao.insert(entity);
    }

    @Override
    public CloudCodePermissionEntity getByKey(Long key, String corpid) {
        return cloudCodePermissionDao.getByKey(key, corpid);
    }

    @Override
    public CloudCodePermissionEntity getByAlias(String alias, String corpid) {
        return cloudCodePermissionDao.getByAlias(alias, corpid);
    }

    @Override
    public Long update(CloudCodePermissionEntity entity) {
        return cloudCodePermissionDao.update(entity);
    }

    @Override
    public List<CloudCodePermissionEntity> findEntities(Map<String, Object> param) {
        return cloudCodePermissionDao.findEntities(param);
    }

    @Override
    public Integer getEntitiesCount(Map<String, Object> param) {
        return cloudCodePermissionDao.getEntitiesCount(param);
    }

    @Override
    public Long deleteByKey(Long key, String corpid) {
        return cloudCodePermissionDao.deleteByKey(key, corpid);
    }

    @Override
    public Long deleteByAlias(String corpid, String alias) {
        return cloudCodePermissionDao.deleteByAlias(corpid, alias);
    }
}
